// created on 25/04/2006 at 21:34
using System;
using Gtk;
using System.Collections;
using System.IO;

public class ComputerGamers1 : ComputerGamersInterface
{
	public string getComputerGamerDescription() {
		return "Random Player. Not use any intellicence";
	}

	public string getComputerGamerDefaultNamePlayer() {
		return "Random_Player";
	}

	public void computeNewMovement(int sizeOfBoard,ButtonInterface[] buttons, out ButtonInterface button1, out ButtonInterface button2) {
		ArrayList buttonToShow=new ArrayList();
		Random rnd=new Random();

		// Build the arraylist with the list of buttons to show.
		for (int i=0; i<sizeOfBoard; i++) {
			if (!buttons[i].isImgVisible()) {
				buttonToShow.Add(buttons[i]);
			}
		}

		// Choose two button random.
		button1=(ButtonInterface)buttonToShow[rnd.Next(buttonToShow.Count)];
		buttonToShow.Remove(button1);
		button2=(ButtonInterface)buttonToShow[rnd.Next(buttonToShow.Count)];
	}
}